<?php 
# 文件名称:feedback.view.php
# MetInfo在线反馈系统 
# Copyright (C) 长沙米拓信息技术有限公司 (http://www.metinfo.cn). All rights reserved.
class feedbackView extends C_view
{
	function feedbackView()
	{
		parent::C_view();
	}
	//加载模板
	function display($tpl)
	{		
		$SYS = &get_instance();
		$this->assignRef('message', $SYS->loader->getMessageQueue());
		$SYS->html->script('core.js');
		switch($tpl)
		{
			case 'edit':
							$SYS->html->script('ckeditor.js','plugins/editors/ckeditor/');
							$js_content="
								CKEDITOR.config.toolbar = 'MetinfoToolbar';
								CKEDITOR.config.toolbar_MetinfoToolbar =
								[
								    ['Source','Preview'],
									['Cut','Copy','Paste','PasteText','PasteFromWord'],
									['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
									['Bold','Italic','Underline','Strike'],
									'/',
									['Styles','Format','Font','FontSize'],
									['TextColor','BGColor']
								];			
								CKEDITOR.config.width = '600px';
								var meteditor;
								function replaceContent( name )
								{
									if ( meteditor )
										meteditor.destroy();
								
									meteditor = CKEDITOR.replace( name, {
												toolbar : 'MetinfoToolbar'		
										}
									);
								}
								function checkPaging()
								{
									if(meteditor==undefined) return true;
									return Paging.submit();
								}
								
							";
							$SYS->doc->addScriptDeclaration($js_content);
							$this->assignRef('mailtpls', $this->get('MailTpls'));
							$this->assignRef( 'title', C_text::_('feedback edit'));
							$this->assignRef( 'subTitle',C_text::_('EditFeedback'));
							$this->assignRef('item', $this->get('Item'));
							$this->assign('apply', "edit");
							parent::display('feedback_edit');break;
			
			default:		$js_content="
								
								markRows();	
							";
							$SYS->doc->addScriptDeclaration($js_content);
							$this->assignRef( 'title', C_text::_('feedback manager'));
							$this->assignRef( 'items', $this->get('Items'));
							$this->assignRef( 'lists', $this->get('Lists'));
							$this->assignRef( 'pagination', $this->get('Pagination'));
							parent::display('feedback');
		}
	}
}
# 本程序是一个开源系统,使用时请你仔细阅读使用协议,商业用途请自觉购买商业授权.
# Copyright (C) 长沙米拓信息技术有限公司 (http://www.metinfo.cn). All rights reserved.
?>